﻿
	config.initpage = function(formNode){
		var event = formNode.event;
		
		//扩展保存前事件，检查累计变更金额占合同比例
		event.on('beforesave', function(event, data) {
			var form = event.form;
			
			var money_chg = form.getNum('project_designchg__money_chg');
			var money_allchg = form.getNum('project_designchg__money_allchg');
			var contract_money = form.getNum('project_designchg__contract_money');
			if ( money_chg + money_allchg >= contract_money*0.1 ) {
				JxHint.alert('累计工程量变更金额已超过合同金额的10%！');
			}
			
			return true;
		});
	};